<template>
	<view class="about">
		<uni-list>
			<uni-list-item
					v-for="(item,index) in navList"
					:key="index"
					:title="item.title"
					></uni-list-item>
		</uni-list>
		<!-- <view class="history-section icon">
			<view class="sec-header">
				<i class="iconfont iconshare"></i>
				<text>分享商城二维码给好友</text>
			</view>
			<view class="qrcode-wrapper">
				<view class="qrcode-section">
					<rf-image class="qrcode" :src="aboutInfo.qrcode"></rf-image>
					<text class="info">商城二维码</text>
				</view>
			</view>
		</view> -->
	</view>
</template>

<script>/**
* @des 关于商城
*
* @author stav stavyan@qq.com
* @date 2019-12-09 10:13
* @copyright 2019
*/
import uniList from "@/components/uni-list/uni-list"
import rfImage from "@/components/rf-image/rf-image"
import uniListItem from "@/components/uni-list-item/uni-list-item"
import {merchantView} from "@/api/merchant";

import {merchantDetail} from "@/api/product";
export default {
	data() {
		return {
			aboutInfo: {},
			navList: [
				{ title: ''},
				{ title: '' },
				{ title: '' }
			]
		}
	},
	components: {
		uniList,
		uniListItem,
		rfImage
	},
	onLoad(options) {
		this.initData(options);
	},
	methods: {
		// 初始化数据
		initData (options) {
			let params = {
				 merchant_id : options.id
			};
			this.$post(`${merchantDetail}`, params).then(r => {
				console.log(r)
				this.navList[0].title = '商城地址：'+r.data.address_name;
				this.navList[1].title = '商家电话：'+r.data.mobile;
				this.navList[2].title = '商家简介：'+r.data.address_details;
			}).catch((err) => {
				console.log(err)
			});
		},
		
	}
}
</script>
<style lang="scss">
	page{
		position: relative;
		background-color: #f5f5f5;
	}
	/*关于商城*/
	.about {
		padding: 20upx 0;
		.history-section{
			padding: 30upx 0 0;
			margin-top: 20upx;
			background: #fff;
			border-radius:10upx;
			.sec-header{
				display:flex;
				align-items: center;
				font-size: $font-base;
				color: $font-color-dark;
				line-height: 40upx;
				margin-left: 30upx;
				.iconfont{
					font-size: 44upx;
					color: #5eba8f;
					margin-right: 16upx;
					line-height: 40upx;
				}
			}
			.qrcode-wrapper {
				margin: 40upx auto;
				display: flex;
				.qrcode-section {
					flex: 1;
					overflow: hidden;
					text-align: center;
					.qrcode {
						width: 280upx;
						height: 280upx;
						image {
							width: 280upx;
							height: 280upx;
						}
					}
					.info {
						display: block;
						margin-bottom: 40upx;
					}
				}
			}
		}
	}
	.about /deep/ .uni-list-item__extra {
	     width: 0%;
	}
</style>
